home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / chkdef.zip / CHKDEF.DOC next >
Text File  |  1989-09-19  |  7KB  |  182 lines

  1.    A long time ago, in a city far far away...
  2.  
  3.      San Antonio, TX ran totally crashmail on all its local
  4. echos. The time for this is past (unfortunately) but its
  5. memory still lives on.  (Actually we still run 'true
  6. crashmail' but not during the heavy usage hours when it
  7. becomes a practical impossibility) In this kind of a set up
  8. you scan your message bases after EACH caller.  One of the
  9. things I did to speed up processing of RBBSMAIL scan was to
  10. create a small fast pascal program to prune all the files
  11. out of my areas.bbs file that hadn't changed since the last
  12. time a scan was run. This may seem like a waste of time to
  13. you, but remember I was running on two 90ms hard drives and
  14. the time saved was very noticable to me.  This was done
  15. (with a few glitches at first, like stripping out my origin
  16. line and writing dozens of little files instead of one
  17. single data file, said glitches having been mercilessly
  18. pointed out by one Mike Zakharoff who put the thing through
  19. its paces for me.  I followed his suggestions for
  20. improvement scrupulously and was finally satisfied with the
  21. results when WHAM no more hard drive.  Needless to say I
  22. didn't have a backup.  What to do?  I had no more source,
  23. and my latest executable version still lying around was old
  24. and buggy.  I was despondent and moped around for months
  25. thinking evil thoughts and studying arcane methods of data
  26. recovery...
  27.  
  28.      The only fortunate thing is that chkdef never got
  29. released, ergo I didn't have to support the thing without
  30. even having the source... Finally I came out of my doldrums
  31. and spent a day to re-write the durned thing.  This version
  32. is more logically written, more flexible, smaller, and
  33. faster than the original.  (It helps having completely
  34. written the thing once, lemme tell ya...)  So here's the
  35. real docs:
  36.  
  37. SWITCHES (run without parameters for help)
  38.  
  39.   /B - Runs CHKDEF in BEFORE USER mode.  When this switch is
  40.        set chkdef will scan your areas.bbs file and record
  41.        each non-comment line in it as well as the time-date
  42.        stamp of each messages file into a temporary file for
  43.        later comparison.
  44.  
  45.   /A - Runs CHKDEF in AFTER USER mode.  When this switch is
  46.        set chkdef will scan the temporary file created when
  47.        it is run in the /B mode and compare the time date
  48.        stamps recorded in it with the current ones. Any
  49.        messages files which have changed will be recorded in
  50.        a secondary areas.bbs file.
  51.  
  52.   /I:INFILE - This is your file containing echos and their
  53.               destinations which normally RBBSMAIL uses for
  54.               scanning.  The default is AREAS.BBS
  55.  
  56.   /O:OUTFILE -This can be anything you want, and is the name
  57.               of the secondary areas.bbs file which chkdef
  58.               will create which does not contain unchanged
  59.               message bases.  The default is AREAS.BB2
  60.  
  61.   /T:TEMPFILE-This can also be anything you like, it is the
  62.               file in which chkdef will store the lines of
  63.               your areas.bbs which are not comments and the
  64.               date/time stamps of the message files. The
  65.               default is AREAS.&&&
  66.  
  67.  
  68. Example of usage:
  69.  
  70.   CHKDEF /B    {Gets current time stamps of messages files}
  71.   RBBS-PC ...                {user logs in}
  72.   CHKDEF /A     {Creates smaller secondary areas.bbs file}
  73.   RBBSMAIL SCAN -O -F:AREAS.BB2
  74.                      {scan only changed message bases}
  75.   Binkley.bat
  76.  
  77. or alternatively (like I have it...)
  78.  
  79.   RBBS-PC ...    {I like this configuration better as}
  80.   CHKDEF  /A    {it doesn't add any delay to user logon}
  81.                     {and the results are identical}
  82.   RBBSMAIL SCAN -O -S -F:AREAS.BB2
  83.   CHKDEF /B
  84.   Binkley.bat
  85.  
  86. Technical notes
  87. ---------------
  88. 1)  CHKDEF opens the messages files very briefly to obtain
  89.     the date/time stamp. it does NOT write to them.  This
  90.     may be of interest for multi-node people.
  91.  
  92. 2)  The date/time stamp is stored immediately after the line
  93.     containing the message file in AREAS.BB2.
  94.  
  95. 3)  CHKDEF makes these assumptions about your areas file...
  96.     The first NON COMMENT line is your origin line. Any line
  97.     beginning with a <SPACE>, a '-' or a ';' is a comment
  98.     line. Blank lines are ignored.
  99.  
  100. 4)  You CAN specify /B and /A at the same time.  Chkdef will
  101.     ALWAYS process AFTER USER mode first.  This way you can
  102.     combine everything into one step like so:
  103.  
  104.     RBBS-PC CHKDEF /B /A RBBSMAIL SCAN /A:AREAS.BB2
  105.     BINKLEY.BAT
  106.  
  107.     Unfortunately RBBSMAIL's scan function will change the
  108.     messages file if a message has been entered, and you
  109.     will wind up scanning it TWICE (this time and the next
  110.     time you run chkdef)
  111.  
  112. 5)  Chkdef is NOT smart enough to tell the difference
  113.     between a user joining a conference and a message being
  114.     entered into it.  So if a user enters a conference it
  115.     will change the checkpoint record changing the time/date
  116.     stamp.  Chkdef will faithfully pass the name of the
  117.     conference along to RBBSMAIL for processing.
  118.  
  119. 6)  The clear screen is an ANSI sequence, all output is
  120.     fully redirectable to the communications port or a file.
  121.  
  122. 7)  Any files which are listed in your AREAS.BBS but don't
  123.     exist will generate an error message on your screen
  124.     indicating the missing file (it will NOT stop
  125.     processing) which will simplify maintenance of this file
  126.     for sysops with large numbers of echos.  When I first
  127.     ran the thing on my areas.bbs I was shocked at how much
  128.     junk I had left in it.
  129.  
  130. 8)  Time savings: (Rounded to nearest second) for 17
  131.      unchanged echo message bases.  (65ms ST-238R, No Cache,
  132.      10MHZ XT, results will vary with configuration)  Tests
  133.      run with RBBSMAIL 890902.
  134.  
  135.         -----------------------------
  136.         CHKDEF /B                     -\
  137.         CHKDEF /A                     - > 22 seconds
  138.         RBBSMAIL SCAN -O -F:AREAS.BB2 -/
  139.         -----------------------------
  140.  
  141.         ----------------
  142.         RBBSMAIL SCAN -O  {Run to ensure no changes were}
  143.                                    {scanned}
  144.         RBBSMAIL SCAN -O -> 122 seconds
  145.         ----------------
  146.  
  147. As you can see you need 3+ unchanged message bases to make
  148. CHKDEF break even.  If you run scans in a nightly event this
  149. program may not be for you.  If you run your scans more
  150. frequently it may reduce the time your BBS is offline.  The
  151. more echos you carry the more likely it will save you some
  152. time.  If you scan frequently this WILL save you time.
  153. CHKDEF was designed with 25 echos, 90ms hard drives, and
  154. frequent scanning in mind.  If you have this setup its a
  155. MUST.
  156.  
  157.  
  158.  
  159. Support is available through
  160.  
  161.                       NUL Sysop: Jan Maaskant (1:387/301 |
  162.               8:930/502) (512)690-5601  300-2400
  163.  
  164.  
  165. Turbo Pascal 5.0 Source available on request
  166.  
  167.  
  168. Thanks to Mike Zakharoff who went through the original copy
  169. and found all the bugs.  I've (I think...) remembered all
  170. his suggestions in this one.
  171.  
  172.  
  173. Cost/Registration/etc...
  174.  
  175. The rules for this are the same as for anything else I
  176. write:
  177.  
  178.   1) If you pack ads into files you had no part in the
  179.      development of you may not use this program
  180.   2) If you charge for an RBBS related utility the license
  181.      fee is equivalant
  182.